<%@ page import="com.nebula.common.Const" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title><%=Const.SYSTEM_NAME%>-安全问题验证</title>
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/Base.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/login.css">
    <!--[if lt IE 9]>
    <script src="/assets/html5shiv/html5shiv.min.js"></script>
    <script src="/assets/respond/respond.js"></script>
    <![endif]-->
    <style>
        .error-info {
            color: red;
            font-size: 14px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-xs-offset-4 col-xs-6 clearfix">
            <form action="${pageContext.request.contextPath}/forgot" role="form" class="form-signin" method="post"
                  id="form">
                <input type="hidden" name="method" value="validateQa">
                <input type="hidden" name="username" value="${requestScope.user.username}">
                <h2 class="form-signin-heading text-center">安全问题验证</h2>
                <c:forEach items="${requestScope.qaList}" var="qa" varStatus="i">
                    <div class="mt-15" style="margin-bottom: 5px">安全问题${i.index + 1}：${qa.question}</div>
                    <input type="text" class="form-control mt-5" placeholder="请输入安全问题${i.index + 1}的答案" autofocus
                           autocomplete="off" id="answer${i.index + 1}" name="answer${i.index + 1}"
                           value="${requestScope.answers[i.index]}">
                </c:forEach>
                <button type="submit" class="btn btn-primary btn-block mt-15" id="btNext">下一步</button>
                <div id="form-footer clearfix" class="mt-5">
                    <span class="error-info pull-left" id="errMsg">${requestScope.errMsg}</span>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="${pageContext.request.contextPath}/js/jquery-1.12.4.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/assets/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
